scsi: hisi_sas: Free slot later in slot_complete_vx_hw()
authorXiang Chen <chenxiang66@hisilicon.com>
Mon, 24 Sep 2018 15:06:31 +0000 (23:06 +0800)
committerSalvatore Bonaccorso <carnil@debian.org>
Thu, 18 Jul 2019 22:23:17 +0000 (23:23 +0100)
commitf08b42faff8f8c49892a954fe2c2ec13e105a542
tree72a28651e37b9f689e4a54d09b45846f9d770f66
parentd6af75af205bc26d6079461580850a615b75537d
scsi: hisi_sas: Free slot later in slot_complete_vx_hw()

If an SSP/SMP IO times out, it may be actually in reality be
simultaneously processing completion of the slot in
slot_complete_vx_hw().

Then if the slot is freed in slot_complete_vx_hw() (this IPTT is freed
and it may be re-used by other slot), and we may abort the wrong slot in
hisi_sas_abort_task().

So to solve the issue, free the slot after the check of
SAS_TASK_STATE_ABORTED in slot_complete_vx_hw().

Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Gbp-Pq: Topic bugfix/arm64/huawei-taishan
Gbp-Pq: Name 0004-scsi-hisi_sas-Free-slot-later-in-slot_complete_vx_hw.patch
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c